package com.oocl.venus.action;

import com.oocl.server.main.Command;
import com.oocl.venus.service.PersonService;
import com.oocl.venus.utils.BeanFactory;

public class FindPerson extends Command{
	
	private PersonService personService;
	private BeanFactory beanFactory;
	
	public void execute() {
		try {
			beanFactory = new BeanFactory();
			personService = beanFactory.getInstance("personService");
			String data = personService.find(request.getParameter("pid"));
			response.write(data);
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (InstantiationException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		}
	}

}
